<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui" template="/templates/layout.xhtml">

	<ui:define name="ptitle">用户密码修改</ui:define>
	<ui:define name="pcontent">
		<h:form id="frm">
			<p:growl id="msgs1" showDetail="true" />
			<p:panel id="userPanel" header="操作用户信息" style="margin-bottom:5px"
				footer="请输入正确的当前密码以及新密码等必要信息进行修改操作。">

				<h:panelGrid columns="2" cellspacing="10" style="font-size:18px;">
					<p:outputLabel for="userno" value="操作帐号:" style="color:red;" />
					<h:outputText id="userno" value="#{sysUserPasswdMB.userno}" style="color:red;" />

					<p:outputLabel for="password" value="当前密码:" style="color:red;" />
					<p:password id="password" placeholder="输入当前密码" 
						value="#{sysUserPasswdMB.password}" onfocus="this.select();"
						required="true" requiredMessage="当前密码必须输入"
						validatorMessage="当前密码验证不过(3-20个字符)">
						<f:validateRegex
							pattern="^[A-Za-z0-9~`!@#$%^&amp;*()_&lt;&gt;/\\{}:;,.?]{3,20}$" />
					</p:password>
					<p:outputLabel for="password1" value="新密码:" style="color:red;" />
					<p:password id="password1" placeholder="输入新密码"
						value="#{sysUserPasswdMB.newpassword1}" onfocus="this.select();"
						required="true" requiredMessage="新密码必须输入"
						validatorMessage="新密码验证不过(3-20个字符)">
						<f:validateRegex
							pattern="^[A-Za-z0-9~`!@#$%^&amp;*()_&lt;&gt;/\\{}:;,.?]{3,20}$" />
					</p:password>
					<p:outputLabel for="password2" value="重新输入新密码:" style="color:red;" />
					<p:password id="password2" placeholder="重新输入新密码"
						value="#{sysUserPasswdMB.newpassword2}" onfocus="this.select();"
						required="true" requiredMessage="新密码必须输入"
						validatorMessage="新密码验证不过(3-20个字符)">
						<f:validateRegex
							pattern="^[A-Za-z0-9~`!@#$%^&amp;*()_&lt;&gt;/\\{}:;,.?]{3,20}$" />
					</p:password>
				</h:panelGrid>
				<h:panelGrid columns="2">
					<p:commandButton value="取消" icon="ui-icon-power"
						action="#{sysUserPasswdMB.cancelAction}" update="msgs1">
					</p:commandButton>
					<p:commandButton value="提交" icon="ui-icon-check"
						action="#{sysUserPasswdMB.passwdAction}" update="msgs1">
					</p:commandButton>
				</h:panelGrid>
			</p:panel>
		</h:form>

	</ui:define>
</ui:composition>

